﻿		<div id="content">
			<div class="searchform">
			{if !empty($error)}
				{$error}
			{/if}			
				<div class="content">
					<fieldset>
						<legend>ค้นหา</legend>
						<form action="{$APP_URL}/search" method="POST" id="search">
							<label class="inlined">คำค้น</label>
							<input type="text" name="q" class="input-text validate['required']" size="80" />
							<input type="hidden" name="session" value="{$user.session_id}" />
							<div style="margin:10px 0 0 4px;"><button type="submit" class="super secondary small">ค้นหา</button> <button type="reset" class="super secondary small">ยกเลิก</button></div>
						</form>
					</fieldset>
				</div>
			</div>
		{if !empty($topics)}
			<div class="success">ผลการค้นหา "{$q}" พบจำนวน {$count} กระทู้</div>
		{/if}
		{if !empty($topics)}
			<div class="topic_list rounded">
				<div class="header rounded">
					<div class="title">หัวเรื่อง</div>
					<div class="poster">โดย</div>
					<div class="views">ตอบ / ดู</div>
					<div class="last_post">โพสล่าสุด</div>
				</div>
				<div class="body rounded">
			{if !empty($topics)}
				{foreach from=$topics item=t}				
					<div class="list">
						<div class="title"><a href="{$APP_URL}/topic/{$t.topic_id}" title="{$t.topic_title_raw}">{$t.topic_title}</a></div>
						<div class="poster"><a href="{$APP_URL}/user/{$t.topic_poster}" title="ดูโปรไฟล์ของ {$t.realname}">{$t.realname}</a></div>
						<div class="views">{$t.posts_count} / {$t.topic_view}</div>
						<div class="last_post">{$t.topic_time}</div>	
					</div>
				{/foreach}
			{/if}					
				</div>
			</div>
		{/if}
			<div style="clear: both;">&nbsp;</div>
		</div>
		<!-- end #content -->
	{literal}
		<script type="text/javascript">
		window.addEvent('domready', function(){
			new FormCheck('search', {'trimValue': true});
		});
		</script>
	{/literal}		